
import { createRouter, createWebHistory } from "vue-router"

//创建配置信息
const routes =[
     {
        path:'/home',
        name:'home',
        component: ()=>import('../views/Home.vue'),
         meta:{title:'首页',show:true,icon:'House',useFrame:false}
    },
    {
        path:'/',
        name:"login",
        component: ()=> import('../views/Login.vue'),
        // show:true  代表要不要在菜单中展示 ， useFrame 为true 表示是全屏展示 false 不是全全屏
        meta:{title:'登录操作',show:false,icon:'',useFrame:true}
    },
      {
        path:'/moveShow',
        name:"moveShow",
        component: ()=> import('../views/MoveShow.vue'),
        // show:true  代表要不要在菜单中展示 ， useFrame 为true 表示是全屏展示 false 不是全全屏
        meta:{title:'移动端页面',show:true,icon:'Iphone',useFrame:true}
    },
    {
        path:'/moveDetail',
        name:"moveDetail",
        component: ()=> import('../views/MoveDetial.vue'),
        // show:true  代表要不要在菜单中展示 ， useFrame 为true 表示是全屏展示 false 不是全全屏
        meta:{title:'商品详情',show:false,icon:'Iphone',useFrame:true}
    },
    {
        path:'/product',
        component:()=> import('../views/product/Index.vue'),
        meta:{title:'商品管理',show:true,icon:'Grid'},
        children : [
            {
                path:'/product/list',
                name:'product-list',
                component:()=> import('../views/product/List.vue'),
                 meta:{title:'商品列表',show:true,icon:'List'}
            },
            {
                path:'/product/add',
                name:'product-add',
                component:()=> import('../views/product/Add.vue'),
                 meta:{title:'商品添加',show:true,icon:'Plus'}
            },
            {
                path:'/product/edit',
                name:'product-edit',
                component:()=> import('../views/product/Edit.vue'),
                 meta:{title:'商品修改',show:true,icon:'Plus'}
            }
         ]
    },
      {
        path:'/category',
        component:()=> import('../views/category/Index.vue'),
        meta:{title:'类目管理',show:true,icon:'Tickets'},
        children : [
            {
                path:'/category/list',
                name:'category-list',
                component:()=> import('../views/category/List.vue'),
                 meta:{title:'类目列表',show:true,icon:'List'}
            },
            {
                path:'/category/add',
                name:'category-add',
                component:()=> import('../views/category/Add.vue'),
                 meta:{title:'类目添加',show:true,icon:'Plus'}
            }
         ]
    }
   
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router